from django.conf import settings
from django.urls import path, include
from vote import views

urlpatterns = [
    path('', views.show_subjects,name='index'),# 学科信息
    path('teachers/', views.show_teachers),# 教师信息
    path('teachers/praise/', views.praise_or_criticize),# 赞
    path('teachers/criticize/', views.praise_or_criticize),# 差评
    path('register/', views.register, name='register'),# 注册
    path('login/', views.login, name='login'),# 登录
    path('logout/', views.logout, name='logout'),# 登出
    path('captcha/', views.get_captcha),#验证码
    path('excel/', views.export_teachers_excel),# 表格
    path('teachers_data/', views.get_teachers_data),# data信息
    path('bar/<str:no>/', views.show_bar),# 报表
]

if settings.DEBUG:

    import debug_toolbar

    urlpatterns.insert(0, path('__debug__/', include(debug_toolbar.urls)))